Store Returned Value in Local Variable (SRVLV)

Description:

Instead of invocation of the same getter method multiple times, it is more efficient to call it once and store the returned value in a local variable.

Incorrect:

string str, key1, key2;

...

if (str.Substring(index).Equals(key1) || str.Substring(index).Equals(key2)) {
    ...
}

Correct:

string str, key1, key2;

...

string s = str.Substring(index);
if (s.Equals(key1) || s.Equals(key2)) {
    ...
}